/*订阅RSS的代码*/
function sub()
{
    var form = document.getElementById("sub_form");
    var RSSURL = "http://localhost/looker/looker/index.php/Feed/read/category/";
    var inputs = form.getElementsByTagName("input");
    var checkboxCnt = 0;
    for(var i=0; i<inputs.length; i++){
        if(inputs[i].type=="checkbox" && inputs[i].checked){
            if(checkboxCnt!=0)
                RSSURL +="-";
            RSSURL +=inputs[i].value; 
            checkboxCnt++;
        }
    }
    if(!checkboxCnt){
        document.getElementById("feed_confirm_notice").style.display="none";
        return;
    }

    var link = "<a href=\""+RSSURL+"\" target=\"_blank\">"+RSSURL+"</a>";
    document.getElementById("rss_address").innerHTML = link;
    document.getElementById("feed_confirm_notice").style.display="block";

}


function fleshVerify(){
//重载验证码
var timenow = new Date().getTime();
document.getElementById("img_verify").src= '/sl/admin/index.php/Public/verify/'+timenow;
}


$(document).ready(function(){
    var cale = new Calendar("idCalendar", { 
                           // SelectDay: new Date().setDate(10), 
                            onSelectDay: function(o){ o.className = "onSelect"; }, 
                            onToday: function(o){ o.className = "onToday"; }, 
                            onFinish: function(){ 
                                $1("idCalendarYear").innerHTML = this.Year; 
                                $1("idCalendarMonth").innerHTML = this.Month; 
                              //   var flag = [10,15,20]; 
                               //  for(var i = 0, len = flag.length; i < len; i++){ 
                                //    this.Days[flag[i]].innerHTML = "<a href='javascript:void(0);' onclick=\"alert('您选择的日期是："+this.Year+"/"+this.Month+"/"+flag[i]+"');return false;\">" + flag[i] + "</a>"; 
                                //} 
                } 
    });
    $1("idCalendarPre").onclick = function(){ cale.PreMonth(); } 
    $1("idCalendarNext").onclick = function(){ cale.NextMonth(); } 
});